import { Session } from '/@/utils/storage';
export const tableOption = {
    border: true,
    index: true,
    indexLabel: "序号",
    indexWidth:60,
    stripe: true,
    menuAlign: "left",
    menuWidth: 220,
    align: "left",
    addBtn: false,
    addBtnText: "添加影像",
    addTitle: "添加影像",
    editBtn: false,
    delBtn: false,
    searchSpan: 4,
    searchMenuSpan:4,
    dialogWidth: 500,
    dialogClickModal: false,
    dialogEscape: false,
    columnBtn:false,
    searchShowBtn:false,
    column: [
      {
        type: "input",
        label: "影像名称",
        prop: "name",
        span: 24,
        search: true,
        addDisplay: true,
        rules: [
          { required: true, message: "请输入影像名称", trigger: "blur" },
          { min: 4, max: 20, message: "请输入4-20个字符之间" },
        ],
      },
      {
        type: "select",
        label: "影像类型",
        prop: "dataType",
        span: 24,
        search: true,
        addDisplay: true,
        width: 96,
        dicData: [
          { label: "无人机影像", value: "map" },
          { label: "多光谱影像", value: "light" },
        ],
        rules: [{ required: true, message: "请选择影像类型", trigger: "blur" }],
      },
      {
        type:'year',
        label: "采集时间",
        prop: "dataYear",
        searchPlaceholder: "请选择年份",
        search: true,
        hide: true,
        addDisplay: false,
        valueFormat:'YYYY',
        format:'YYYY',
      },
      {
        type: "month",
        label: "采集时间",
        prop: "dataMonth",
        searchPlaceholder: "请选择月份",
        search: true,
        hide: true,
        valueFormat:'MM',
        format:'MM',
        addDisplay: false,
      },
      {
        type: "date",
        label: "采集日期",
        prop: "collectDate",
        hide: true,
        addDisplay: true,
        rules: [{ required: true, message: "请选择采集日期", trigger: "blur" }],
      },
      {
        type: "input",
        label: "采集日期",
        prop: "collectDate2",
        slot: true,
        width: 120,
        addDisplay: false,
      },
      {
        type: "input",
        label: "上传时间",
        prop: "startTime",
        width: 146,
        addDisplay: false,
      },
      {
        type: "input",
        label: "文件数/已完成",
        prop: "fileCount",
        slot: true,
        width: 128,
        addDisplay: false,
      },
      {
        type: "input",
        label: "进度",
        prop: "ratio",
        slot: true,
        width: 96,
        addDisplay: false,
      },
      {
        label: "状态",
        prop: "status",
        type: "select",
        width: 96,
        dicUrl: "/app/admin/dict/type/common_resource_upload_status",
        dicHeaders:{
            'Authorization':`Bearer ${Session.getToken()}`
        },
        addDisplay: false,
        slot: true,
      },
    ],
  };
  